import axios from 'axios';

// 获取当前城市
export const getCity = () =>
  axios.get('https://restapi.amap.com/v3/ip', {
    params: {
      key: '112f7278845a2b4a727d04cffeb63b0b',
    },
  });

// 根据城市查询天气
export const getWeather = (city) =>
  axios.get('https://restapi.amap.com/v3/weather/weatherInfo', {
    params: {
      key: '112f7278845a2b4a727d04cffeb63b0b',
      city,
    },
  });
